package tests;

import main.Utils;

import java.io.IOException;
import java.io.ByteArrayOutputStream;
import java.io.DataOutputStream;

/**
 * Created by IntelliJ IDEA.
 * User: Qiukexu
 * Date: 2009-6-15
 * Time: 17:11:33
 * Company: Shanghai Fastech Co.,Ltd.
 */
public class TestByte {
    public static void main1(String[] args) throws IOException {
        int test = 822096384;
        ByteArrayOutputStream buf = new ByteArrayOutputStream();
        DataOutputStream out = new DataOutputStream(buf);
        out.writeInt(test);
        byte[] output = buf.toByteArray();
        System.out.println(output);
    }
    public static void main(String[] args) throws IOException {
        byte[] test = new byte[4];
        test[0] = 0x31;
        test[1] = 0x2D;
        test[2] = 0x32;
        test[3] = 0x31;

        Utils utils = new Utils();
        int res = utils.readInt(test);
        System.out.println(res);
    }

}
